package com.zlc.workflow.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 流程操作日志类型
 */
@Getter
@AllArgsConstructor
public enum ProcessLogTypeEnum {


    BUILD("BUILD","创建流程"),
    SUBMIT("SUBMIT","提交流程"),
    REJECT("REJECT","退回流程"),
    ADD_ACTOR("ADD_ACTOR","加签"),
    TRANSFER("TRANSFER","转办"),
    TERMINATION("TERMINATION","终止流程"),
    EVENT_CALL("EVENT_CALL","流程事件,回调接口"),
    EVENT_NODE("EVENT_NODE","流程事件,备案待阅"),
    ;

    private String type;
    private String desc;

    public static ProcessLogTypeEnum  getLogType(String type){
        ProcessLogTypeEnum[] types = values();
        for(ProcessLogTypeEnum nodeType : types){
            if(nodeType.type.equals(type)){
                return nodeType;
            }
        }
        return null;
    }
}
